﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="ht_sua_cauhinh.aspx.cs" Inherits="Andy.Web.admin.ht_sua_cauhinh" validateRequest="false"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function ValidateForm() {
            var strtxtTitle = $.trim($("textarea[id$='txtTitle']").val());
            if (strtxtTitle == '') {
                alert('Chưa nhập title');
                return false;
            }
            if (strtxtTitle.length > 250) {
                alert('Title quá dài . Tối đa cho phép 250 kí tự');
                return false;
            }
            


            var strTileMenu = $.trim($("textarea[id$='txtTileMenu']").val());
            if (strTileMenu == '') {
                alert('Chưa nhập title menu');
                return false;
            }
            if (strTileMenu.length > 250) {
                alert('Title menu quá dài . Tối đa cho phép 250 kí tự');
                return false;
            }
            



            var strTitleSanPham = $.trim($("textarea[id$='txtTitleSanPham']").val());
            if (strTitleSanPham == '') {
                alert('Chưa nhập title sản phẩm');
                return false;
            }
            if (strTitleSanPham.length > 250) {
                alert('Title sản phẩm quá dài . Tối đa cho phép 250 kí tự');
                return false;
            }
            


            var strHuongDan = $.trim($("textarea[id$='txtHuongDan']").val());
            if (strHuongDan == '') {
                alert('Chưa nhập hướng dẫn');
                return false;
            }
            if (strHuongDan.length > 2000) {
                alert('Title sản phẩm quá dài . Tối đa cho phép 2000 kí tự');
                return false;
            }
            var strMaMau = $.trim($("input[id$='txtMaMau']").val());
            if (strMaMau == '') {
                alert('Chưa nhập mã màu');
                return false;
            }
            if (strMaMau.length > 20) {
                alert('Mã màu quá dài . Tối đa cho phép 20 kí tự');
                return false;
            }
            return true;
        }
    </script>
    <div id="page">
    <div class="inner">
        <div class="section">
            <!--[if !IE]>start title wrapper<![endif]-->
            <%--<div class="title_wrapper">
                <h2>
                    Thêm mới sản phẩm
                </h2>
                <!--[if !IE]>start section menu<![endif]-->
                <ul class="section_menu">
                    <li><a href="#null"><span>
                        <span>Quản lý</span></span></a></li>
                    <li><a class="active" href="#null">
                        <span><span>Thêm mới</span></span></a></li>
                </ul>
                <!--[if !IE]>end section menu<![endif]-->
                <span class="title_wrapper_left"></span><span class="title_wrapper_right"></span>
            </div>--%>
            <!--[if !IE]>end title wrapper<![endif]-->
            <!--[if !IE]>start section content<![endif]-->
            <div class="section_content">
                <!--[if !IE]>start section content top<![endif]-->
                <div class="sct">
                    <div class="sct_left">
                        <div class="sct_right">
                            <div class="sct_left">
                                <div class="sct_right">
                                    <div style="margin-bottom: 20px;">
                                        <ul class="system_messages">
                                            
                                            <li class="blue"><span class="ico"></span><strong class="system_title">Thông tin cấu hình trang chủ</strong></li>
                                            <asp:HiddenField runat="server" ID="hdfID" />
                                        </ul>
                                    </div>
                                    
                                    <div class="mrow">
                                        <p class="t">
                                            Title</p>
                                        <p class="i">
                                            <%--<input name="ctl00$ContentPlaceHolder1$ctl00$txtMaSP" id="ctl00_ContentPlaceHolder1_ctl00_txtMaSP" style="font-family:Arial;font-size:Small;width:390px;" type="text">--%>
                                            <asp:TextBox runat="server" style="font-family:Arial;font-size:Small;width:390px;" ID="txtTitle" TextMode="MultiLine" Rows="3" Columns="5"></asp:TextBox>
                                        </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Title menu</p>
                                        <p class="i">
                                            <%--<input name="ctl00$ContentPlaceHolder1$ctl00$txtMaSP" id="ctl00_ContentPlaceHolder1_ctl00_txtMaSP" style="font-family:Arial;font-size:Small;width:390px;" type="text">--%>
                                            <asp:TextBox runat="server" style="font-family:Arial;font-size:Small;width:390px;" ID="txtTileMenu" TextMode="MultiLine" Rows="5" Columns="10"></asp:TextBox>
                                        </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Title chi tiết sản phẩm</p>
                                        <p class="i">
                                            <%--<input name="ctl00$ContentPlaceHolder1$ctl00$txtMaSP" id="ctl00_ContentPlaceHolder1_ctl00_txtMaSP" style="font-family:Arial;font-size:Small;width:390px;" type="text">--%>
                                            <asp:TextBox runat="server" style="font-family:Arial;font-size:Small;width:390px;" ID="txtTitleSanPham" TextMode="MultiLine" Rows="5" Columns="10"></asp:TextBox>
                                        </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Hình ảnh hướng dẫn (Kích thước 200 x 300)</p>
                                        <p class="i">
                                            <img id="imgHuongDan" runat="server" style="width:200px; height:300px; border-width:medium;" src="" />
                                            <asp:FileUpload ID="fileUploader" runat="server"  />
                                        </p>
                                        <p class="i">
                                            
                                        </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Hình ảnh logo menu (Kích thước 245 x 50)</p>
                                        <p class="i">
                                            <img id="imgLogo" runat="server" style="width:245px; height:50px; border-width:medium;" src="" />
                                            <asp:FileUpload ID="fileUploadlogo" runat="server"  />
                                        </p>
                                        <p class="i">
                                            
                                            </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Hướng dẫn mua hàng </p>
                                        <p class="i">
                                            <%--<input name="ctl00$ContentPlaceHolder1$ctl00$txtMaSP" id="ctl00_ContentPlaceHolder1_ctl00_txtMaSP" style="font-family:Arial;font-size:Small;width:390px;" type="text">--%>
                                            <asp:TextBox runat="server" style="font-family:Arial;font-size:Small;width:800px;" ID="txtHuongDan" TextMode="MultiLine" Rows="20" Columns="200"></asp:TextBox>
                                        </p>
                                    </div>
                                    <div class="mrow">
                                        <p class="t">
                                            Mã màu trang chủ</p>
                                        <p class="i">
                                            <%--<input name="ctl00$ContentPlaceHolder1$ctl00$txtMaSP" id="ctl00_ContentPlaceHolder1_ctl00_txtMaSP" style="font-family:Arial;font-size:Small;width:390px;" type="text">--%>
                                            <asp:TextBox runat="server" style="font-family:Arial;font-size:Small;width:390px;" ID="txtMaMau"></asp:TextBox>
                                        </p>
                                    </div>

                                    <div class="mrowq">
                                        <p class="t">
                                            &nbsp;
                                        </p>
                                        <p class="i">
                                            <asp:Button runat="server" Text="Lưu" ID="btLuu" OnClick="btLuu_Click" OnClientClick="return ValidateForm();" />
                                            </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--[if !IE]>end section content top<![endif]-->
                <!--[if !IE]>start section content bottom<![endif]-->
                <span class="scb"><span class="scb_left"></span><span class="scb_right"></span></span>
                <!--[if !IE]>end section content bottom<![endif]-->
            </div>
            <!--[if !IE]>end section content<![endif]-->
        </div>
    </div>
</div>
</asp:Content>
